package core

import (
	"errors"
)

type NoHtml struct {
	error
}

type SaveError struct {
	error
}

func NewNoHtml() error {
	return NoHtml{
		errors.New("this response is not text/html"),
	}
}

func IsNoHtml(err error) bool {
	_, ck := err.(NoHtml)
	return ck
}

func NewSaveError() error {
	return SaveError{
		errors.New("this response is not text/html"),
	}
}

func IsSaveError(err error) bool {
	_, ck := err.(SaveError)
	return ck
}
